// 基础路由（无需登录）
export const constantRoutes = [
  {
    path: '/login',
    name: 'Login',
    component: () => import('@/views/Login.vue'),
    meta: {
      title: '登录',
      hideNav: true // 隐藏导航栏
    }
  },
  {
    path: '/404',
    name: 'NotFound',
    component: () => import('@/views/Error/404.vue'),
    meta: {
      title: '页面不存在',
      hideNav: true
    }
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404'
  }
];

// 需要登录的动态路由
export const dynamicRoutes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('@/views/Home.vue'),
    meta: {
      title: '首页',
      requiresAuth: true // 需要登录
    }
  },
  {
    path: '/user',
    name: 'User',
    component: () => import('@/views/User.vue'),
    meta: {
      title: '个人中心',
      requiresAuth: true
    }
  },
  {
    path: '/room',
    name: 'Room',
    component: () => import('@/views/Room.vue'),
    meta: {
      title: '房间加载中',
      requiresAuth: true,
      hideNav: true
    }
  },
];